package org.fastsyncer.core.util;

import javax.naming.NamingException;

import org.fastsyncer.common.entity.MappingTask;
import org.json.JSONException;
import org.json.JSONObject;

public abstract class ParseDriver {

    /**
     * 解析数据源和目标源
     * @param rel
     * @param mappingTask
     * @throws JSONException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws ClassNotFoundException
     * @throws NamingException
     */
    protected static void parseDriver(JSONObject rel, MappingTask mappingTask)
            throws JSONException, InstantiationException, IllegalAccessException, ClassNotFoundException, NamingException {
        // 1.解析数据源
        ParseDriverSource.parse(rel, mappingTask);

        // 2.解析目标源
        ParseDriverTarget.parse(rel, mappingTask);
    }

}
